/*******************************************************************************
*   Copyright (C) Harbin Institute of Technology, Shenzhen.
*				  All Rights Reserved.
*   Department: Decoration
********************************************************************************
* File Name   : algorithm.h
* Author      : Dayuan
* Version     : v0.01
* Date        : 2019/9/6
* Description : Decoration Rototics Manipulator task.
*******************************************************************************/
/*-History----------------------------------------------------------------------
* Version   Date      Name        Changes and comments
* v0.01     2019/9/6  Dayuan    initial version
*=============================================================================*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _ALGORITHM_H_
#define _ALGORITHM_H_

#ifdef __cplusplus
 extern "C" {
#endif
     
/**** Includes ****/

     
/**** Definition of constants ****/
#define LIMIT_ANGLE_POS 170
#define LIMIT_ANGLE_NEG -170 

#define PID_SPEED 0
#define PID_POSITION 1
/**** Definition of types ****/ 
typedef struct
{
	float kp;
	float ki;
	float kd;
}PID_EFF;

/**** Definition of macros ****/



/**** Declaration of constants ****/


/**** Declaration of variables ****/


/**** Declaration of functions ****/
static int sign(float data);
//static int issamesign(float a, float b);
#ifdef __cplusplus
}
#endif

#endif
